package net.xi.news.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
@TableName(value = "t_news")
public class News {


    @TableId(type = IdType.AUTO)
    private String id;
    private String title;

    private String content;
    private String firstPicture;
    private String flag;
//    浏览量
    private Integer views=0;
    private boolean appreciation;
    private boolean share;
    private boolean comment;
    private boolean published;
    private boolean recommend;
    private String description;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    private String type;
    private Integer status;

    private Long userid;

    @TableField(exist = false)
    private String typename;

    @TableField(exist = false)
    private SysUser user;

    @TableField(exist = false)
    private List<Tag> tags = new ArrayList<>();

    @TableField(exist = false)
    private List<Comment> comments = new ArrayList<>();

    @TableField(exist = false)
    private List<Type> types=new ArrayList<>();

//    前端遍历序号
    @TableField(exist = false)
    private String cont;

}
